package com.speed_run.dto;

import lombok.Data;

import java.util.Date;
@Data
public class CommnetDTO {
    private Integer id;
    private Integer momentId;
    private String content;
    private String userId;
    private String toUserId;
    private Integer isDeleted =0;
    private Date createDate;


    public CommnetDTO convertDTO(CommentVo vo){
        CommnetDTO dto = new CommnetDTO();
        dto.setContent(vo.getContent());
        dto.setCreateDate(vo.getCreateDate());
        dto.setMomentId(vo.getId());
        dto.setIsDeleted(vo.getIsDeleted());
        dto.setToUserId(vo.getToUserId());
        dto.setUserId(vo.getUserId());
        return  dto;
    }
}
